<extend name="Layout:layout_edit" />
<block name="body_content_block">
<div class="panel">
    <h3>授权信息</h3>
    <a href="#" class="lnk-import">[导入证书]</a>
    <p style="line-height: 24px; margin:15px 0px;">
        最大用户数：{$data.agent}<br/>
        最大外呼数：{$data.trunk}<br/>
        过期时间：{$data.expires_time}
    </p>
    <div style="display:none;" id="frmImport">
        <form id="frmMain" action="{:AddonU('Licence/licence_import_save')}" method="post" enctype="multipart/form-data">
            <fieldset style="margin: 0px;">
                <legend>导入证书</legend>
                <ul>
                    <li>
                        <label>选择证书</label>
                        <input type="file" name="zsfile" placeholder="请选择证书" required/>
                    </li>
                    <li>
                        <label>&nbsp;</label>
                        <input type="submit" value="上传" class="button" /></li>
                </ul>
            </fieldset>
            <input type='hidden' value='dialog' name='show'/>
        </form>
    </div>
</div>
</block>
<block name="body_after_block">
<script type="text/javascript">
$('.lnk-import').click(function(){
    var $this=$(this);
    if($this.text()=='[导入证书]'){
        $this.text('[授权信息]');
        $(this).next().hide();
        $('#frmImport').show();
    }else{
        $this.text('[导入证书]');
        $(this).next().show();
        $('#frmImport').hide();
    }
    return false;
})
</script>
</block>